@(title: String, nav: String = "")(content: Html)

@import be.objectify.deadbolt.views.html._
@import be.objectify.deadbolt.Deadbolt

<!DOCTYPE html>
<html lang="@lang().code()">
  <head>
    <title>@title</title>
    
    <!-- Le meta -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Nexus - an online counsellor">
    <meta name="author" content="The Nexus Team">
    
    <!-- Le scripts -->
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="@routes.Assets.at("js/bootstrap.min.js")"></script>
	<script src="@routes.Application.jsRoutes" defer="defer"></script>
	
	<link rel="stylesheet" media="screen" href='@routes.Assets.at("stylesheets/main.css")'>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js" type="text/javascript"></script>

	<link rel="stylesheet" media="screen" href='@routes.Assets.at("fullcalendar-1.5.3/fullcalendar/fullcalendar.css")'>
    <script src='@routes.Assets.at("fullcalendar-1.5.3/fullcalendar/fullcalendar.min.js")' type="text/javascript"></script>
    <script src='@routes.Assets.at("js/renderCalendar.js")' type="text/javascript"></script>

	
	
    <!-- Le styles -->
    <link href="@routes.Assets.at("stylesheets/main.min.css")" rel="stylesheet">
    <link href="@routes.Assets.at("css/bootstrap.css")" rel="stylesheet">
    

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="@routes.Application.index()">Nexus</a>
          
          <div class="btn-group pull-right">
          @if(Deadbolt.viewRoleHolderPresent()) {
          	@defining(Application.getLocalUser(session())) { user =>
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <i class="icon-user"></i> @user.name
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li><a href="@routes.Application.profile()">@Messages("playauthenticate.navigation.profile")</a></li>
              <li><a href="@routes.Account.link()">@Messages("playauthenticate.navigation.link_more")</a></li>
              <li class="divider"></li>
              <li><a href="@com.feth.play.module.pa.controllers.routes.Authenticate.logout()"><i class="icon-off"></i> @Messages("playauthenticate.navigation.logout")</a></li>
            </ul>
            }
          } else {
            <a href="@routes.Application.login()" class="btn btn-primary btn-mini @("disabled".when(nav == "login"))">@Messages("playauthenticate.navigation.login")</a>
          }
          </div>

          
          <div class="nav-collapse">
            <ul class="nav">
              <li class="@("active".when(nav == ""))"><a href="@routes.Application.index()">@Messages("playauthenticate.navigation.home")</a></li>
              <li class="@("active".when(nav == "restricted"))"><a href="@routes.Application.restricted()">Dashboard</a></li>
               
                @if(!Deadbolt.viewRoleHolderPresent()) {
			    	<li class="@("active".when(nav == "signup"))"><a href="@routes.Application.signup()">@Messages("playauthenticate.navigation.signup")</a></li>
			    }else{
				 <li class="dropdown" id="menu1">
					<a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
						MyEvents
						<b class="caret"></b>
					</a>
				 <ul class="dropdown-menu">
					<li><a href="@routes.Calendar.calendar()">Full Calendar</a></li>
					<li><a href="@routes.Calendar.list()">Event List</a></li>
				 </ul>
				 </li>
				 <li class="@("active".when(nav == ""))"><a href="@routes.Application.renderArchivedVideosList()">@Messages("playauthenticate.navigation.archive")</a></li>
				
				}
			
				
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">
	    @if(flash.contains(Application.FLASH_ERROR_KEY)) {
	      <div class="alert alert-error">
	      	@flash().get(Application.FLASH_ERROR_KEY)
	      </div>
	    }
	    @if(flash.contains(Application.FLASH_MESSAGE_KEY)) {
	      <div class="alert alert-success">
	      	@flash().get(Application.FLASH_MESSAGE_KEY)
	      </div>
	    }
		@content
		
    <hr>

      <footer>
        <p>&copy; 2012 Nexus.</p>
       </footer>
    </div> <!-- /container -->

  </body>
</html>
